//
//  UITool.h
//  UU
//
//  Created by 王 家振 on 13-11-2.
//  Copyright (c) 2013年 王 家振. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "SVProgressHUD.h"

//返回按钮字体
#define BTN_TITLE_SIZE                  15.0

@interface UITool : NSObject

// 消息提示框，用系统默认提示框
+ (void) showSampleMsg:(NSString *)title message:(NSString *) strMsg;

// MBProgressHUD 文本提示框
+ (void) showMBProgressHud:(UIView* )view withText:(NSString* )str withTime:(CGFloat)time;

+ (void) showMBProgressHud:(UIView *)view withTitle:(NSString *)str detail:(NSString* )detail withTime:(CGFloat)time;
+ (void) showMBProgressHud:(UIView *)view withTitle:(NSString *)str detail:(NSString* )detail withTime:(CGFloat)time completion:(void(^)())block;

//加载中…………
+ (void) showLoadProgressHud:(UIView *)view withText:(NSString *)str animated:(BOOL)animated;
+ (void)hideLoadProgressHud:(UIView *)view;
// 不需要委托alert
+ (void) alertNotifyError:(NSString* )title contentStr:(NSString* )content thread:(BOOL)isOnMainThread;

// 只要一个确定按钮
+ (void) alertNotify:(NSString* )title contentStr:(NSString* )content thread:(BOOL)isOnMainThread;

// 有确认，取消两个按钮的Alert
+ (void) alertOkAndCancel:(NSString* )title contentStr:(NSString* )content delegate:(id)target thread:(BOOL)isOnMainThread;

// 有确认，取消两个按钮的Alert 带tag
+ (void) alertOkAndCancel:(NSString* )title contentStr:(NSString* )content delegate:(id)target thread:(BOOL)isOnMainThread withTag:(int)tag;

// 不需要回调时target设为nil即可
+ (void) showMessage:(NSString* )msg titleStr:(NSString* )title delegate:(id)target;

// 设置导航条
+ (void)customizeNavBar:(UIViewController*)targetView withTitle:(NSString *)title
            haveLButton:(BOOL)bHaveL haveRButton:(BOOL)bHaveR
       normalImageNameL:(NSString*)nmlImgNameL highlightedImageNameL:(NSString*)hltImgNameL buttonNameL:(NSString*)btnNameL
       normanImageNameR:(NSString*)nmlImgNameR highlightedImageNameR:(NSString*)hltImgNameR buttonNameR:(NSString*)btnNameR;

// 设置导航条, 左边为凌形按钮，右边为长方形按钮
+ (void)customizeNavBar:(UIViewController*)targetView withTitle:(NSString *)title buttonNameL:(NSString*)btnNameL buttonNameR:(NSString*)btnNameR;
//// 设置导航条，标题与左边按钮
+ (void)customizeNavBar:(UIViewController* )target withTitle:(NSString *)title buttonLeft:(UIButton *)leftBtn leftImage:(UIImage *)leftImage leftTitle:(NSString *)leftTitle;
//// 设置导航条，标题与右边按钮
+ (void)customizeNavBar:(UIViewController* )target withTitle:(NSString *)title buttonRight:(UIButton *)rightBtn rightImage:(UIImage *)rightImage rightTitle:(NSString *)rightTitle;


// 设置导航条,左右都是图片按钮
+ (void)customizeNavBar:(UIViewController* )target withTitle:(NSString* )title buttonImgL:(UIView* )left buttonImgR:(UIView* )right;

+ (void)customizeNavBar:(UIViewController* )target withTView:(UIView* )title buttonImgL:(UIView* )left buttonImgR:(UIView* )right;


//星后导航栏
+ (void)xhNavBar:(UIViewController *)target title:(UILabel *)titleView leftBtn:(UIButton *)leftBtn leftImage:(UIImage *)leftImage rightBtn:(UIButton *)rightBtn rightImage:(UIImage *)rightImage;

@end
